/*
 * Copyright (C) 2013 SeekDeepWithin.com
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
package com.seekdeepwithin.Resources;

/**
 * User: Jonathan Montiverdi
 * Date: Sep 30, 2013
 *
 * A class used to hold links to all the resources in seek deep within.
 */
public class SdwResources
{
   /**
    * The applications main icon.
    */
   public final static String SDW_ICON = SdwResources.class.getResource ("icon.png").toString ();
   /**
    * The main JFX style sheet.
    */
   public final static String MAIN_CSS = SdwResources.class.getResource ("controls.css").toString ();
   public final static String QTIP_JS = SdwResources.class.getResource ("jquery.qtip.min.js").toString ();
   public final static String QTIP_CSS = SdwResources.class.getResource ("jquery.qtip.min.css").toString ();
   public final static String BOOTSTRAP = SdwResources.class.getResource ("bootstrap.min.css").toString ();
   public final static String BOOTSTRAP_JS = SdwResources.class.getResource ("bootstrap.min.js").toString ();
   public final static String JQUERY_2_0_3 = SdwResources.class.getResource ("jquery-2.0.3.min.js").toString ();
   public final static String BOOTSTRAP_RES = SdwResources.class.getResource ("bootstrap-responsive.min.css").toString ();
   public final static String ICON_INFO = SdwResources.class.getResource ("information.png").toString ();
   public final static String ICON_WARNING = SdwResources.class.getResource ("warning.png").toString ();
   public final static String ICON_CANCEL_16 = SdwResources.class.getResource ("cancel_16.png").toString ();
   public final static String ICON_CANCEL_32 = SdwResources.class.getResource ("cancel_32.png").toString ();
   public final static String ICON_DOWN_ARROW = SdwResources.class.getResource ("bullet_arrow_down.png").toString ();

   /**
    * Gets the full path to the requested resource.
    * @param resource Resource to get path for.
    * @return The full path to the requested resource.
    */
   public static String getResourcePath (String resource)
   {
      return SdwResources.class.getResource (resource).toString ();
   }

   /**
    * Gets a style sheet link for the given style sheet.
    * @param cssLink Style sheet to get link for.
    * @return HTML style sheet link.
    */
   public static String getCssLink (String cssLink)
   {
      StringBuilder styles = new StringBuilder ();
      styles.append ("<link type=\"text/css\" rel=\"stylesheet\" href=\"")
              .append (cssLink)
              .append ("\" media=\"screen\" />");
      return styles.toString ();
   }

   /**
    * Gets a javascript link for the given javascript item.
    * @param jsLink The link to the javascript item.
    * @return HTML javascript link.
    */
   public static String getJsLink (String jsLink)
   {
      StringBuilder styles = new StringBuilder ();
      styles.append ("<script type=\"text/javascript\" src=\"")
              .append (jsLink)
              .append ("\"></script>");
      return styles.toString ();
   }
}
